<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<title>修改和获取CSS样式</title>
	</head>
	<body>
			<h1>赠汪伦</h1>
		<p id="p1">李白乘舟将欲行</p>
		<p id="p2">忽闻岸上踏歌声</p>
		<p>桃花潭水深千尺</p>
		<p>不及汪伦送我情</p>
		
		<input type="button" value="获取修改cssy样式" onclick="click1()"/>
		
		<script type="text/javascript">
			function click1(){
				var p1=document.getElementById("p1");
				p1.style.color="red";
				p1.style.fontSize="30px";
				p1.style.backgroundColor="skyblue";
				
				
				console.log(p1.style.color);
				console.log(p1.style.fontSize);
				console.log(p1.style.backgroundColor);
			}
			
		</script>
	</body>
</html>
